#include <bits/stdc++.h>
using namespace std;
bool check(string a)
{
    for(auto i:a)
    {
        if(i<48||i>57)
            return false;
    }
    return true;
}
string& add(string& a,string& b)
{
    stack<int> in;
    if(a.length()>b.length())
    {
        int n = a.length()-b.length();
        for(int i=0;i<n;i++)
            b.insert(0,"0");
    }
    else{
        int n = b.length()-a.length();
        for(int i=0;i<n;i++)
            a.insert(0,"0");
    }
    assert(a.length() == b.length());
    for(int i = a.length()-1;i>0;i--)
    {
        if(in.size() == 0)
        {
            int s = a[i]+b[i]-'0'-'0';
            a[i] = (a[i]+b[i]-'0'-'0')%10+'0';
            if(s/10 == 1)
                in.push(s/10);
        }
        else{
            int s = a[i]+b[i]-'0'-'0'+in.top();
            a[i] = s%10+'0';
            in.pop();
            if(s/10 == 1)
                in.push(s/10);
        }
    }
    if(in.top()==1)
        a.insert(0,"1");
    return a;
}
int main()
{
    string a,b;
    cin>>a>>b;
//    a = "12";
//    b = "123";
    if(!check(a)||!check(b))
        cout<<"error";
    else
        cout<<add(a,b)<<endl;
}